package com.webull.information.center.carwler.job;

import java.util.Date;

import org.apache.commons.lang3.time.DateUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.webull.information.center.carwler.task.News_HengShengCnFund_Task;

@Component
public class News_HengShengCnFund_Job implements SimpleJob {
	protected final Logger logger = LogManager.getLogger(getClass());
	private @Autowired News_HengShengCnFund_Task hengShengCrawlerNewsTask;

	@Override
	public void execute(ShardingContext context) {
		try {
			hengShengCrawlerNewsTask.hengShengFundCrawlerTask(DateUtils.addDays(new Date(), -5),
					DateUtils.addDays(new Date(), 1));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}



}
